package me.gm.stcont;

import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class PropertiesWrapper {

	private Logger logger;

	public PropertiesWrapper() {
		this.logger = Logger.getLogger(this.getClass());
	}

	private int paginationSize;

	@Value("#{propertiesFactoryBean['pagination.size']}")
	public void setPaginationSize(String paginationSize) {
		if (logger.isEnabledFor(Level.DEBUG)) {
			logger.debug("paginationSize: " + paginationSize);
		}

		this.paginationSize = Integer.parseInt(paginationSize);
	}

	public int getPaginationSize() {
		return paginationSize;
	}

}
